import unittest
import random
from parameterized import parameterized
def m(a,b):
    return  a+b
def my_rand():
    n = random.randint(1,6)
    return n

def my_s(str):
    sum = 0
    for i in str:
        if i>="0" and i<="9":
            sum+=1
    return sum


# class S1(unittest.TestCase):
#     @parameterized.expand([(1,3,4),(3,3,8),(19,2,21)])
#     def test_01(self,a,b,c):
#         n = m(a,b)
#         self.assertEqual(n,c)
#         # print(m(2,3))
#
#     @unittest.skip
#     def test_02(self):
#         print('跳的过不')

class S2(unittest.TestCase):
    @parameterized.expand([('fsa323fasf2',4),('fjdsa',0)])
    def test_03(self,a,b):
        n = my_s(a)
        self.assertEqual(n,b)



